<template>
  <div class="order">
    <div style="display: flex; height: 100%; flex-direction: column; justify-content: space-between">
      <OrderList :orderList="orderList" />

      <div class="order-pagination">
        <el-pagination
          :page-size="page.page_size"
          :pager-count="6"
          hide-on-single-page
          v-model:current-page="page.page"
          layout="prev, pager, next"
          :total="page.total"
          style="height: 20px"
          @current-change="changeSearch2"
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import { http } from '@/utils/http'
import { onMounted } from 'vue'
import OrderList from './OrderList.vue'

const searchoptios = ref([])
const emits = defineEmits()

const props = defineProps({
  orderList: Array,
  page: Object
})


const changeSearch = () => {
  emits('changeSearch', 1)
}
const changeSearch2 = () => {
  emits('changeSearch', 2)
}

onMounted(() => {})
</script>

<style lang="scss" scoped>
.order {
  height: 100%;
  width: calc(100% - 256px);
  display: flex;
  flex-direction: column;
  // padding: 12px 0;
  // padding-top: 12px;
}

.order-pagination {
  height: 32px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
}
</style>

<style>
.order-pagination .el-pager .is-active {
  color: var(--pcmain-color) !important;
  border: 1px solid var(--pcmain-color);
}
.order-pagination .el-pager,
.order-pagination .el-pager .number,
.order-pagination .el-pager .more,
.order-pagination .btn-prev,
.order-pagination .btn-next {
  height: 20px;
}
.order-pagination .el-pager .number,
.order-pagination .el-pager .more {
  font-size: 12px;
  font-weight: bold;
  color: #000;
}
.order-pagination .el-pager li {
  width: 20px;
  min-width: 20px;
  margin: 0 3px;
}
</style>